#include "../include/PageLib.hpp"
#include "../include/TF_IDF.hpp"
#include "../include/InvertIndexTable.h"

void test()
{
    Configuration &conf = *Configuration::getInstance("../conf/SE.conf");
    DirScanner dirScanner;
    FileProcessor fileProcessor;
    Deduplication del(conf.getConfigMap());
    PageLib pageLib(conf, dirScanner, fileProcessor,del);

    pageLib.create();
    
    pageLib.deduplicate();
    
    pageLib.store();

    TF_IDF tfidf((pageLib.get_ripepage()).size());
    InvertedIndex index(pageLib,del,tfidf);
    index.create_wordmap();
    index.create_invertedTable();
    index.store();

}

int main()
{
    test();
    return 0;
}
